package cn.xfdzx.android.apps.shop.model;


import java.util.Map;

import cn.xfdzx.android.apps.shop.bean.AfterSalesListMarketBean;
import cn.xfdzx.android.apps.shop.bean.AfterSalesListRetailBean;
import cn.xfdzx.android.apps.shop.bean.BaseObjectBean;
import cn.xfdzx.android.apps.shop.bean.ConfirmBeen;
import cn.xfdzx.android.apps.shop.bean.NewOrderBeen;
import cn.xfdzx.android.apps.shop.bean.OrderListBeen;
import cn.xfdzx.android.apps.shop.bean.ReturnReasonBean;
import cn.xfdzx.android.apps.shop.contract.OrderListContract;
import cn.xfdzx.android.apps.shop.contract.PayContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class OrderListModel implements OrderListContract.Model {



    @Override
    public Flowable<OrderListBeen> initData(String type, String sales_model, String page, String limit) {
        return RetrofitClient.getInstance().getApi().orderList(type,sales_model,page,limit);
    }

    @Override
    public Flowable<NewOrderBeen> toPay(String from, String paytype, String uni) {
        return RetrofitClient.getInstance().getApi().orderPay(from,paytype,uni);
    }

    @Override
    public Flowable<ConfirmBeen> confirm(String order_id) {
        return  RetrofitClient.getInstance().getApi().confirmShou(order_id);
    }

    @Override
    public Flowable<ReturnReasonBean> getRefundRreason() {
        return RetrofitClient.getInstance().getApi().getRefundRreason();
    }

    @Override
    public Flowable<ReturnReasonBean> getAfterServiceRequest(Map<String, Object> param) {
        return RetrofitClient.getInstance().getApi().getAfterServiceRequest(param);
    }

    @Override
    public Flowable<ReturnReasonBean> getReturnReason() {
        return RetrofitClient.getInstance().getApi().getReturnReason();
    }

    @Override
    public Flowable<AfterSalesListRetailBean> getAfterSalesRetailList(Map<String, Object> param) {
        return RetrofitClient.getInstance().getApi().getAfterSalesRetailList(param);
    }

    @Override
    public Flowable<AfterSalesListRetailBean> getIsExceedTime(String orderId) {
        return RetrofitClient.getInstance().getApi().getIsExceedTime(orderId);
    }

    @Override
    public Flowable<AfterSalesListMarketBean> getAfterSalesMarketList(Map<String, Object> param) {
        return RetrofitClient.getInstance().getApi().getAfterSalesMarketList(param);
    }
}
